package icu.mohan.erp.call.business;

import static icu.mohan.erp.call.constant.ChildAccountUrl.*;

import java.util.Map;

import icu.mohan.erp.call.model.CommonResponse;
import icu.mohan.erp.call.service.CallApiService;
import lombok.AllArgsConstructor;

/**
 * 子账号管理
 * 
 * @author yanglihao
 */
@AllArgsConstructor
public class ChildAccountBusiness {

    private CallApiService callApiService;

    /**
     * 创建子账号
     */
    public CommonResponse createAccount(Map<String, String> requestBody) throws Exception {
        return callApiService.post(CREATE_ACCOUNT, requestBody);
    }

    /**
     * 变更子账号
     */
    public CommonResponse updateAccount(Map<String, String> requestBody) throws Exception {
        return callApiService.post(UPDATE_ACCOUNT, requestBody);
    }

    /**
     * 关闭子账号
     */
    public CommonResponse disableAccount(Map<String, String> requestBody) throws Exception {
        return callApiService.post(DISABLE_ACCOUNT, requestBody);
    }
}
